
<!doctype html>
<html lang="en" class="fixed accounts lock-screen">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>Helsinki</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="vendor/animate.css/animate.css">
    <link rel="stylesheet" href="stylesheets/css/style.css">
	<link href="JBox/plugins/Notice/jBox.Notice.css"  rel="stylesheet"/>
    <link href="JBox/plugins/Confirm/jBox.Confirm.css" rel="stylesheet" />
	<script src="javascripts/jquery.min.js"></script>
	<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="vendor/nano-scroller/nano-scroller.js"></script>
	<script type="text/javascript" src="javascripts/jquery.cookie.js" ></script>
	<script type="text/javascript" src="JBox/jBox.js"></script>
	<script type="text/javascript" src="JBox/plugins/Notice/jBox.Notice.js"></script>
	<script>
		if($.cookie("UM")==null||$.cookie("UM")=="null"){
    		window.location="login.html";
    	}
		var upwd="";
		$(document).ready(function(){
			$(".username").text($.cookie("UMN"));
			
			$(".btnUnLock").click(function(){
				upwd=$("#password").val()
				if($.trim(upwd)==""){
					new jBox('Notice', {width: 200,height: 45,content: '请输入密码！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-200)/2,y: ($(window).height())/2}
					});
			}else{
					$.ajax({
	                type: "post",
	                dataType: "json",
	                contentType: "application/json",
	                url: "UnicomService.asmx/UserLogin",
	                cache: false,
	                data: JSON.stringify({ "uname": $.cookie("UMC"), "upwd": upwd}),
	                beforeSend: function () {
	                },
	                success: function (result) {
	                	if(result.d.ID!=0){                		                		
	                   		window.location="index.html";
	                	}
	                   	else{
	                   		new jBox('Notice', {width: 200,height: 45,content: '密码错误！',autoClose: 2000,
								color: 'red',animation: {open: 'slide:right',close: 'slide:top'},
								position: {x: ($(window).width()-200)/2,y: ($(window).height())/2}
							});
	                   		$("#password").focus();
	                   	}
	                },
	                error: function (msg) { console.log(msg.responseText); }
	           		});					
				}
			});
		});
	</script>
</head>
<body>   
<div class="wrap">
    <div class="page-body">
        <div class="logo">
            <div class="avatar">
                <img alt="Jane Doe" src="images/user-avatar.jpg" />
            </div>
        </div>
        <div class="box animated fadeInUp">
            <div class="panel">
                <div class="panel-content bg-scale-0">
                        <h3 class="text-center mb-md username"></h3>
                        <div class="form-group">
                                <span class="input-with-icon">
                                        <input type="password" class="form-control" id="password" placeholder="密码">
                                        <i class="fa fa-key"></i>
                                    </span>
                        </div>
                        <div class="form-group">
                            <button  class="btn btn-primary btn-block btnUnLock">解 锁</button>
                        </div>
                        <div class="form-group text-center">
                            <a href="login.html" style="color: #ff6100;">切换用户</a>
                        </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="javascripts/template-script.min.js"></script>
<script src="javascripts/template-init.min.js"></script>
</body>

</html>
